package com.shengyuan.manage_os.old.ying.boce.jsy;

import java.util.List;

import com.shengyuan.manage_os.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class MapMarkAdapter extends BaseAdapter {

	private List<ErpMapMarker> mList;
	private Context mContext;
	
	public MapMarkAdapter(Context pContext, List<ErpMapMarker> pList) {
		mContext = pContext;
		mList = pList;
	}

	@Override
	public int getCount() {
		return mList.size();
	}

	@Override
	public Object getItem(int arg0) {
		return mList.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {
		return arg0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		LayoutInflater _l = LayoutInflater.from(mContext);
		View convertView = _l.inflate(R.layout.mappersonal,	null);
		if (convertView!=null) {
			TextView tView = (TextView) convertView.findViewById(R.id.marker_username);
			tView.setText(mList.get(arg0).username);
		}
		return convertView;
	}

}
